<extend name="Public/Common/base.html" />
<block name="main">
<style>
.layui-form-label{
	width:110px !important;
	
	
}
</style>
<css  href="__PUBLIC__/layui/css/layui.css"  media="all"/>

  <form class="layui-form" action="{$url}" method="post" >
    <input type="hidden" name="id" value="<notempty name="Ruleinfo.id">{$Ruleinfo.id}</notempty>">	 
  <div class="layui-form-item">
    <label class="layui-form-label">权限标识：</label>
    <div class="layui-input-block">
      <input type="text"  name="name" lay-verify="name" value="<notempty name="Ruleinfo.name">{$Ruleinfo.name}</notempty>" autocomplete="off" placeholder="请输入权限标识" class="layui-input">
    </div>
  </div>
  
   <div class="layui-form-item">
    <label class="layui-form-label">权限名称:</label>
    <div class="layui-input-block">
      <input type="text" name="title" lay-verify="title" value="<notempty name="Ruleinfo.title">{$Ruleinfo.title}</notempty>"  placeholder="请输入权限名称" autocomplete="off" class="layui-input">
    </div>
  </div>
  
   <div class="layui-form-item">
    <label class="layui-form-label">状态：</label>
    <div class="layui-input-block">
      <input type="radio" name="status" value="1"  title="开启" <eq name="Ruleinfo.status" value="1">checked</eq> checked>
      <input type="radio" name="status" value="0" title="关闭"  <eq name="Ruleinfo.status" value="0">checked</eq> >
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="am-btn am-btn-primary" lay-submit="submit" >{$info}</button>   
    </div>
  </div>
  
</form>

   
<js  href="__PUBLIC__/layui/layui.js"  media="all"/>
<script>
layui.use(['form'], function(){
  var form = layui.form()
  ,layer = layui.layer  
  form.verify({
    title: function(value){
        if(value === ""){
        	return "角色不能为空！";
        } 
        if(value.length < 4){
            return '角色名至少得4个字符啊';
          }
       
      },
      name: function(value){
          if(value === ""){
          	return "标识不能为空！";
          } 
          if(value.length < 4){
              return '标识名至少得4个字符啊';
            }
         
        },
  });  
});
</script>

        
      
</block>
